package c3au;

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

public class InterfazCentroMonitoreo extends JFrame{
	
	private PanelListaTramas panelListaTramas;
	private PanelBotones panelBotones;
//	private PanelGrafica panelGrafica;
	
	public InterfazCentroMonitoreo(){
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setTitle("Centro de Monitoreo");
		setSize(800, 600);
		setResizable(false);
		setLayout(new BorderLayout());
		
		
		panelListaTramas= new PanelListaTramas(this);
		panelBotones=new PanelBotones(this);
		add(panelListaTramas, BorderLayout.CENTER);
		add(panelBotones, BorderLayout.SOUTH);
		
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		//USER INTERFACE
		try {
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	public void iniciarMision(String nombre, String tiempo)
	{
//		panelGrafica=new PanelGrafica();
	}
	
	public void actualizar(String trama){
		panelListaTramas.actualizarLista(trama);
		repaint();
		panelListaTramas.updateUI();
	}
	
	public void iniciarDialogo(){
		DialogoCrearMision dcm=new DialogoCrearMision(this);
		dcm.setVisible(true);
	}
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		InterfazCentroMonitoreo inter=new InterfazCentroMonitoreo();
		inter.show(true);
		CentroMonitoreo mundo=new CentroMonitoreo(inter);
	}
}
